<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="crm.model.Purchase"%>
<%@page import="crm.util.ParamUtil"%>
<%@page import="crm.control.PurchaseControl"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="../../../resources/js/WebCalendar.js"></script>
<link rel="stylesheet" href="../../../resources/css/reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../../resources/css/inner.css" type="text/css" media="screen" />
<style type='text/css'>
 a{font-size:12px; text-decoration:none; color:#70B300;}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>purchase_update</title>
	</head>
	<body>
		<%
			request.setCharacterEncoding("UTF-8");
			int id = Integer.parseInt(request.getParameter("id"));
			//System.out.print(id);
			Purchase purchase = new Purchase();
			purchase=PurchaseControl.getPurchaseById(id);
		%>
		<form action="purchase_update_do.jsp?id=<%=id%>" method="post">
			<table>
				<tr>
					<td>
						购买时间
					</td>
					<td>
						<input type="text" name="time" maxlength="20" onClick="SelectDate(this,'yyyy-MM-dd')" readonly style="width: 150px; cursor: pointer" value="<%=purchase.getTime()%>"/>
					</td>
				</tr>
				<tr>
					<td>
						物品单价
					</td>
					<td>
						<input type="text" name="single_price"
							value="<%=purchase.getSingle_price()%>" />
					</td>
				</tr>
				<tr>
					<td>
						物品数量
					</td>
					<td>
						<input type="text" name="goods_num"
							value="<%=purchase.getGoods_num()%>" />
					</td>
				</tr>
				<tr>
					<td>
						总支出
					</td>
					<td>
						<input type="text" name="sum_fee"
							value="<%=purchase.getSum_fee()%>" />
					</td>
				</tr>
				<tr>
					<td>
						物品名称
					</td>
					<td>
						<input type="text" name="goods_name"
							value="<%=purchase.getGoods_name()%>" />
					</td>
				</tr>
				<tr>
					<td>
						购买地
					</td>
					<td>
						<input type="text" name="place"
							value="<%=purchase.getPlace()%>" />
					</td>
				</tr>
				<tr>
					<td>
						购买者
					</td>
					<td>
						<input type="text" name="person"
							value="<%=purchase.getPerson()%>" />
					</td>
				</tr>
				<tr>
					<td>
						出售者
					</td>
					<td>
						<input type="text" name="seller"
							value="<%=purchase.getSeller()%>" />
					</td>
				</tr>
				<tr>
					<td>
						联系电话
					</td>
					<td>
						<input type="text" name="seller_contact"
							value="<%=purchase.getSeller_contact()%>" />
					</td>
				</tr>
				<tr>
					<td colspan="2" style="text-align: center">
						<input type="submit" class='button' id="submit" value="提交" />
					</td>
				</tr>
			</table>
		</form>
	</body>
</html>